home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Pane2 / c / Hide < prev    next >
Text File  |  1995-08-23  |  2KB  |  70 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Pane2.Hide.c
  12.     Author:  Copyright © 1995 Andrew Sellors.
  13.     Version: 1.04 (4th August 1995)
  14.     Purpose: Handles windows with panes.
  15. */
  16.  
  17. #include "DeskLib:Pane2.h"
  18. #include "Pane2Defs.h"
  19. #include "Desklib:Event.h"
  20. #include "DeskLib:Template.h"
  21. #include "Desklib:EventMsg.h"
  22. #include "Desklib:Error.h"
  23.  
  24. #include <stdlib.h>
  25.  
  26.  
  27. /******************************************************************************/
  28.  
  29. extern void Pane2_Hide(window_handle mainwindow)
  30. {
  31.  /*
  32.   * Closes the window 'mainwindow' (removes it from screen) and all it's panes
  33.   * Use in the same manner to Window_Hide
  34.   */
  35.   main_listelement *mainelement;
  36.   pane_listelement *paneelement;
  37.  
  38.  /*
  39.   * find element for main window and return if mainwindow not present
  40.   */
  41.   mainelement = FindMainWindow(mainwindow);
  42.   if(mainelement == NULL)
  43.      return; /* not found */
  44.  
  45.  /*
  46.   * hide main window
  47.   */
  48.   Window_Hide(mainelement->mainwindow);
  49.  
  50.  /*
  51.   * hide all panes belonging to the main window
  52.   */
  53.  
  54.  /*
  55.   * find first pane window
  56.   */
  57.   paneelement = LinkList_FirstItem(&(mainelement->paneanchor));
  58.  
  59.   while(paneelement != NULL){
  60.  
  61.     Window_Hide(paneelement->panewindow);
  62.     
  63.     /*
  64.      * find next pane window
  65.      */
  66.      paneelement = LinkList_NextItem(&(paneelement->header));
  67.   }
  68.  
  69. }
  70.